package com.ale.oxetool.service;

import com.ale.oxetool.util.Configuration;
import org.springframework.stereotype.Service;

/**
 * Created by guoshunw on 2015/10/14.
 */

public class UserServiceImpl implements UserService {

    private Configuration config = Configuration.getInstance();

    @Override
    public boolean login(String username, String password) {
        String savedUsername = getAdminName();
        // Development saved password is hello123
//        String savedPassword = config.get("password");
//        return username.equals(savedUsername) && savedPassword.equals(DigestUtils.sha256Hex(password));
//
        return false;
    }

    @Override
    public String getAdminName() {
        return config.get("username");
    }


}
